<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/1.2.1/axios.js"></script>
</head>

<body>
    <button>发送请求</button>
    <script>
        // 获取按钮
        let btns = document.querySelectorAll('button');

        btns[0].onclick = function () {
            //定义2个axios调用 
            let a1 = axios('http://localhost:3000/students1111');
            let a2 = axios('https://v1.hitokoto.cn/?c=h');

            console.log(a1, a2);

            let a3 =axios.all([a1,a2]);
            console.log(a3);
            // 监听2个axios执行结果及定义回调
        }

    </script>
</body>

</html>